<template>
    <n-form
        label-width="auto"
        label-placement="left"
        size="small"
    >
        <n-form-item label="原密码" show-require-mark>
            <n-input type="password" v-model:value="form.oldPassword"/>
        </n-form-item>
        <n-form-item label="新密码" show-require-mark>
            <n-input type="password" v-model:value="form.newPassword"/>
        </n-form-item>
        <n-form-item label="确认密码" show-require-mark>
            <n-input type="password" v-model:value="form.confirmPassword"/>
        </n-form-item>
        <n-form-item label=" ">
            <n-button type="info" @click="handleSaveOnClick">保存</n-button>
        </n-form-item>
    </n-form>
</template>
<script lang="ts" setup>
import { reactive } from 'vue'
import { putPassword } from '@/api/base/user'
import { IMessage } from '@/utils/message'

const form = reactive({

} as PasswordDto)

async function handleSaveOnClick(){
    const { message } = await putPassword(form)
    IMessage({ content: message })
}

</script>